package hb.software.entity;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import domain.BaseTreeEntity;
import hb.software.entity.Teacher;
@Entity
@Table(name="T_TeacherCategory")
@NamedQueries({ @NamedQuery(name = "TeacherCategory.getRoot", query = "select g from TeacherCategory g where g.parent is null") })
public class TeacherCategory extends BaseTreeEntity<TeacherCategory,Long> {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7289566538018581683L;
	@OneToMany(mappedBy = "teacherCategory", cascade = CascadeType.REMOVE, fetch = FetchType.EAGER)
	List<Teacher>courses;
}

